package com.hotleproject.service.impl;

import com.hotleproject.mapper.OrderMapper;
import com.hotleproject.pojo.Order;
import com.hotleproject.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;
    @Override
    public int getCount() {
        return this.orderMapper.getCount();
    }

    @Override
    public List<Order> pageList(int pageNo, int pageSize) {
        return this.orderMapper.pageList(pageNo,pageSize);
    }

    @Override
    public int getCountByUser() {
        return this.orderMapper.getCountByUser();
    }

    @Override
    public List<Order> findOrderByUser(String username, int pageNo, int pageSize) {
        return this.orderMapper.selectOrderByUser(username,pageNo,pageSize);
    }

    @Override
    public int getSingleHotleCount() {
        return this.orderMapper.getSingleHotleCount();
    }

    @Override
    public List<Order> SingleHotlepageList(String hotlename,int pageNo, int pageSize) {
        return this.orderMapper.SingleHotlepageList(hotlename,pageNo,pageSize);
    }
}
